﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CsplProjectConsole;
using ClassWithinLibrary;

namespace CsplProjectConsoleNameSpace
{
    class Program
    {
        static void Main(string[] args)
        {
            ClassA classA = new ClassA(1);
            classA.ShowResult();

            Class1 class1 = new Class1();
            Console.WriteLine(class1.PublicMethod()); // public method
            classA.MyProperty = 0000;
            ClassA classACopy = classA;
            Console.WriteLine("classACopy before classA changed myVar: {0}", classACopy.MyProperty);

            classA.MyProperty = 9999;
            Console.WriteLine("classACopy before classA changed myVar: {0}", classACopy.MyProperty);

            CustomPoint cp = new CustomPoint(10, 15);
            Console.WriteLine("x: {0}, y: {1} ", cp.x, cp.y);
            CustomPoint cpcopy = cp;
            Console.WriteLine("cpcopy before cp changed x: {0}, y: {1}", cpcopy.x, cpcopy.y);
            cp.x = 100;
            cp.y = 120;
            Console.WriteLine("cpcopy after cp changed x: {0}, y: {1}", cpcopy.x, cpcopy.y);

            IList<string> list = new List<string> { "A", "B", "C", "D" };
            foreach (string item in list) {
                Console.WriteLine(item);
            }

            for (int i = 0; i < list.Count; i++) 
            {
                Console.WriteLine(list[i]);
            }

            int x = 0;

            Console.WriteLine(x++);
            Console.WriteLine(++x);
            Console.Read();

            
        }
    }

    public struct CustomPoint{
        public int x;
        public int y;
        public CustomPoint(int x, int y){
            this.x = x;
            this.y = y;
        }
    }
}
